package com.sanploy.manage.conf.lisener;


import com.sanploy.manage.service.OrderTimerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;


/**
 * Created by zhu yingzhi on 2017/9/7.
 * @author  yingzhi zhu
 * 订单监听类 实现30分钟取消 3天确认
 */
@Component
public class StartListen implements ApplicationListener<ApplicationReadyEvent> {

    @Autowired
    private OrderTimerService orderTimerService;

    @Override
    public void onApplicationEvent(final ApplicationReadyEvent event) {
        orderTimerService.startTimer();
    }

}
